#define STATE_CMD 0 // Wait_for_User_CMD
#define STATE_S 1 // Wait_for_S_repy
#define STATE_S1 2 // Wait_for_S_repy-1
#define STATE_S2 3// Wait_for_S_repy-2
#define STATE_S3 4// Wait_for_S_repy-3
#define STATE_P 5// Wait_for_P_reply
#define STATE_I 6// Wait_for_I_repy
#define STATE_DT 7// Data_Transfer
#define STATE_EXIT 8// Data_Transfer





int checkState();
void state_Cmd(char* cmd);
void state_S_reply();
void state_S1_reply(char* cmd);
void state_S2_reply(char* cmd);
void state_S3_reply();
void state_I_reply();
void state_P_reply(char* cmd);
void state_Data_transfer();
